package fr.n7.sma.model;


/**
 * This class defines an attractor.
 * An attractor is a force caracterized by :
 * 		- its application poshort (a cell, the center)
 * 		- its force
 * 		- its radius
 * The value is such that :
 * 		- if we are at the center, the attraction equals to force
 * 		- if we are at a radius distance of the center, the attraction is null
 * 		- otherwise, the attraction is proportional to position/radius*force 
 * 
 * @author bbaccot && clej37
 *
 */
public class Attractor<CellProperty> {

	//The center...
	private Cell<CellProperty> center;
	//The force at the center
	private float force;
	//The radius of effect
	private float radius;
	//The name
//	private String name;
	/**
	 * Create an attractor from a center cell, the force and the radius
	 * 
	 */
	public Attractor(Cell<CellProperty> center, float force, float radius) {
//		this.name = name;
		this.center = center;
		this.force = force;
		this.radius = radius;
	}

	/*
	 * Getters and setters
	 */
	
	public Cell<CellProperty> getCenter() {
		return center;
	}

	public void setCenter(Cell<CellProperty> center) {
		this.center = center;
	}

	public float getForce() {
		return force;
	}

	public void setForce(float force) {
		this.force = force;
	}

	public float getRadius() {
		return radius;
	}

	public void setRadius(float radius) {
		this.radius = radius;
	}

//	public String getName() {
//		return name;
//	}

//	public void setName(String name) {
//		this.name = name;
//	}
	
//	@Override
//	public String toString() {
//		return this.getName();
//	}
//
//	public boolean equals(Attractor<CellProperty> a) {
//		return name.equals(a.getName());
//	}
}
